﻿<phone:PhoneApplicationPage 
    x:Class="ALiteTeam.PackageTracer.View.InputOrder"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:GalaSoft_MvvmLight_Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP71"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    DataContext="{Binding Source={StaticResource ViewModelLocator}, Path=InputOrderViewModel}"
    shell:SystemTray.IsVisible="True">
    
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot">
        <!--设定配置好的背景图-->
        <Grid.Background>
            <ImageBrush ImageSource="{Binding BackgroundImage, Source={StaticResource ViewModelLocator}}"/>
        </Grid.Background>
        <!--Pivot Control-->
        <controls:Pivot Name="pivot" Title="风讯快递查询">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="LoadingPivotItem">
                    <GalaSoft_MvvmLight_Command:EventToCommand
                        Command="{Binding LoadingPivotItemCommand}"
                        PassEventArgsToCommand="True"
                        />
                </i:EventTrigger>
            </i:Interaction.Triggers>
            <!--Pivot item one-->
            <controls:PivotItem x:Name="pivotInputItem" Header="{Binding Path=DisplayName, Mode=OneTime}">
                <Grid>
                    <TextBlock Height="30" HorizontalAlignment="Left" Margin="0" Name="lblOrderNumber" Text="请录入快递单号：" VerticalAlignment="Top" />
                    <TextBox Height="72" HorizontalAlignment="Left" InputScope="NameOrPhoneNumber" Margin="0,30,0,0" Name="txbOrderNumber" Text="{Binding Path=OrderNo, Mode=TwoWay}" VerticalAlignment="Top" Width="379" />
                    <Button Content="扫描" Height="72" HorizontalAlignment="Right" Margin="0,30,-11,0" Name="btnScan" VerticalAlignment="Top" Width="99" Command="{Binding GoScanerCommand}"/>
                    <Button Content="上一步" Height="72" HorizontalAlignment="Right" Margin="0,100,270,0" Name="btnPrevious" VerticalAlignment="Top" Width="130" Command="{Binding GoBackCommand}" />
                    <Button Content="下一步" Height="72" HorizontalAlignment="Right" Margin="0,100,80,0" Name="btnNext" VerticalAlignment="Top" Width="130" Command="{Binding GoNextCommand}" />
                </Grid>
            </controls:PivotItem>
            <controls:PivotItem Header="简介" Name="pivotInfoItem">
                <Grid>
                    <Image Name="imgLogo" Source="{Binding Path=LogoFile, StringFormat=/Images/Logo/\{0\}}" Width="148" Height="48" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0" />
                    <TextBlock Name="lblPhone" Text="{Binding Path=PhoneNumber, StringFormat=联系电话：\{0\}}" Width="280" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="160,0,0,0" Height="30" FontSize="24" />
                    <TextBlock Name="lblWebSite" Text="{Binding Path=WebSite, StringFormat=网站：\{0\}}" Width="440" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,50,0,0" Height="30" FontSize="24" />
                    <ScrollViewer HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,85,0,0">
                        <TextBlock Name="lblIntro" Text="{Binding Intro}" TextWrapping="Wrap" />
                    </ScrollViewer>
                </Grid>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="False">
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>